<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery-1.11.3.js"></script>
    <script>
        $(function(){
           $('#username').on('sbUseMyName',function(){
               alert('你的名字被例用了')
           });
           $('#username').on('sbUseMyName',function(){
               alert('你的名字被例用了2')
           });
           $('#username').keyup(function(e){
               console.log(e.target.value);
               if ($(this).val() == 'frank'){
                   $('#username').trigger('sbUseMyName');
               }
           })

        })
    </script>
</head>
<body>
<input type="text" id="username">


</body>
</html>